package com.atguigu.controller;

import com.atguigu.pojo.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;
import java.util.List;

@RestController
@RequestMapping("/user")
public class UserController {
    @GetMapping("")
    public List<User> findAll(){
        return Arrays.asList(
                new User("jim","ok",18,"male"),
                new User("tom","ok",19,"female"),
                new User("lucy","ok",20,"male"),
                new User("kate","ok",18,"female")
        );
    }
}
